/*
 * raw_spi_frame.h
 *
 *  Created on: 28 nov. 2013
 *      Author: crma
 */

#ifndef RAW_SPI_FRAME_H_
#define RAW_SPI_FRAME_H_

#include "object.h"

#define SPI_MAX_FRAME_SIZE          255



typedef struct _raw_spi_frame_t {
    //object_t            obj;
    uint32_t            size;
    uint8_t             data[SPI_MAX_FRAME_SIZE];
}raw_spi_frame_t;

raw_spi_frame_t *raw_frame_new(void);
bool            raw_frame_init(raw_spi_frame_t *this);
uint16_t        raw_frame_calc_checksum(uint16_t *buffer, uint32_t len);



#endif /* RAW_SPI_FRAME_H_ */
